package com.hoshiicloud.saleorder.mq;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @program: hoshiicloud
 * @description: rsa加密配置
 * @author: Mr.wu
 * @create: 2019-05-24 10:03
 **/
@Configuration
public class RsaConfig {
    private static String clientPrivateKey;

    private static String clientPublicKey;

    private static String serverPrivateKey;

    private static String serverPublicKey;

    public static String getClientPrivateKey() {
        return clientPrivateKey;
    }
    @Value("${rsa.clientPrivateKey}")
    public void setClientPrivateKey(String clientPrivateKey) {
        RsaConfig.clientPrivateKey = clientPrivateKey;
    }

    public static String getClientPublicKey() {
        return clientPublicKey;
    }
    @Value("${rsa.clientPublicKey}")
    public void setClientPublicKey(String clientPublicKey) {
        RsaConfig.clientPublicKey = clientPublicKey;
    }

    public static String getServerPrivateKey() {
        return serverPrivateKey;
    }
    @Value("${rsa.serverPrivateKey}")
    public void setServerPrivateKey(String serverPrivateKey) {
        RsaConfig.serverPrivateKey = serverPrivateKey;
    }

    public static String getServerPublicKey() {
        return serverPublicKey;
    }
    @Value("${rsa.serverPublicKey}")
    public void setServerPublicKey(String serverPublicKey) {
        RsaConfig.serverPublicKey = serverPublicKey;
    }
}
